package study.strategy;

public abstract class Duck {

    private FlyBehavior flyBehavior;

    public void setFlyBehavior(FlyBehavior flyBehavior) {
        this.flyBehavior = flyBehavior;
    }

    public void performFly(){
        this.flyBehavior.fly();
    }

    public abstract void display();

    public void swim(){
        System.out.println("All Duck can swim");
    }
}
